package com.newx.file.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * wxpay pay properties.
 *
 * @author Binary Wang
 */
@Data
@ConfigurationProperties(prefix = "newx.file")
public class NewxFileProperties {

  private List<Local> local;
  private List<Aliyun> aliyun;
  private List<Tencent> tencent;

  @Data
  public static class Local {
    /**
     * 文件上传路径
     */
    private String filePath;

    /**
     * 存储桶bucket
     */
    private String bucket;

    /**
     * 文件地址url前缀
     */
    private String  fileUrlPrefix;
  }


  @Data
  public static class Aliyun {
    /**
     * 存储桶bucket
     */
    private String bucket;

    /**
     * 阿里云域名
     */
    private String  endpoint;

    /**
     * 文件上传路径
     */
    private String packagePath;

    /**
     * 阿里云访问id
     */
    private String  accessKeyId;

    /**
     * 阿里云访问密钥
     */
    private String  accessKeySecret;

    /**
     * 文件地址url前缀
     */
    private String  domain;
  }
  @Data
  public static class Tencent {
    private String secretId;
    private String secretKey;
    private String region;
    private String bucketName;
    private String packagePath;
  }


}
